package cn.iune.erp.setting;

import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import com.justep.baas.data.RowState;

@Entity
@Table(name="ParamSetting",uniqueConstraints={@UniqueConstraint(name="paramSetting1", columnNames={"enterpriseNo"})})
@NamedQuery(name="ParamSetting.findAll", query="SELECT s FROM ParamSetting s")
public class ParamSetting {

	@Id
	@Column(length=32)
	private String fID;
	
	
	//////////////进销存参数///////////////////////////////////////////
	//成本计价方式
	@Column(columnDefinition="INT default 1 COMMENT '采用成本制度'",nullable=false)
	private int costingRules = 1;//0：标准成本制，1：实际成本制。
	@Column(columnDefinition="INT default 2 COMMENT '成本计价方式'",nullable=false)
	private int costingType = 2;//2.月加权平均，3.先进先出，4.分批认定。
	//库存现行年月
	@Column(length=7,columnDefinition="VARCHAR(7) default null COMMENT '库存现行年月'")
	private String kcxxny;
	//库存关账年月
	@Column(length=7,columnDefinition="VARCHAR(7) default null COMMENT '库存关账年月'")
	private String kcgzny;
	//账务冻结日期
	@Column(columnDefinition="DATE default NULL COMMENT '账务冻结日期'")
	private Date zwdjrq;
	////////////////////////////////////////////////////////////////////
	
	
	
	
	
	///////////财务参数////////////////////////////////////////
	//应收现行年月
	@Column(length=7,columnDefinition="VARCHAR(7) default null COMMENT '应收现行年月'")
	private String ysxxny;
	//应付现行年月
	@Column(length=7,columnDefinition="VARCHAR(7) default null COMMENT '应付现行年月'")
	private String yfxxny;
	
	//会计开账年月
	@Column(length=7,columnDefinition="VARCHAR(7) default null COMMENT '会计开账年月'")
	private String kjkzny;
	//会计开账结束
	@Column(columnDefinition="INT default 0 COMMENT '会计开账结束'",nullable=false)
	private int kjkzok; //0：未结束，1：结束
	//会计现行年月
	@Column(length=7,columnDefinition="VARCHAR(7) default null COMMENT '会计现行年月'")
	private String kjxxny;
	///////////////////////////////////////////////////////
	
	
	
	
	@Column(length=65)
	private String userId;

	@Column(length=128)
	private String enterpriseNo;
	@Column(length=128)
	private String enterpriseName;

	
	@Version
	private int version = 0;
	
	@Transient//非持久字段
	private RowState rowState;
	public RowState getRowState() {
		return rowState;
	}
	public void setRowState(RowState rowState) {
		this.rowState = rowState;
	}
	

	public String getfID() {
		return fID;
	}
	public void setfID(String fID) {
		this.fID = fID;
	}
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	public int getCostingRules() {
		return costingRules;
	}
	public void setCostingRules(int costingRules) {
		this.costingRules = costingRules;
	}
	public int getCostingType() {
		return costingType;
	}
	public void setCostingType(int costingType) {
		this.costingType = costingType;
	}
	public String getKcxxny() {
		return kcxxny;
	}
	public void setKcxxny(String kcxxny) {
		this.kcxxny = kcxxny;
	}
	public String getKcgzny() {
		return kcgzny;
	}
	public void setKcgzny(String kcgzny) {
		this.kcgzny = kcgzny;
	}
	public Date getZwdjrq() {
		return zwdjrq;
	}
	public void setZwdjrq(Date zwdjrq) {
		this.zwdjrq = zwdjrq;
	}
	public String getYsxxny() {
		return ysxxny;
	}
	public void setYsxxny(String ysxxny) {
		this.ysxxny = ysxxny;
	}
	public String getYfxxny() {
		return yfxxny;
	}
	public void setYfxxny(String yfxxny) {
		this.yfxxny = yfxxny;
	}
	public String getKjkzny() {
		return kjkzny;
	}
	public void setKjkzny(String kjkzny) {
		this.kjkzny = kjkzny;
	}
	public int getKjkzok() {
		return kjkzok;
	}
	public void setKjkzok(int kjkzok) {
		this.kjkzok = kjkzok;
	}
	public String getKjxxny() {
		return kjxxny;
	}
	public void setKjxxny(String kjxxny) {
		this.kjxxny = kjxxny;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getEnterpriseNo() {
		return enterpriseNo;
	}
	public void setEnterpriseNo(String enterpriseNo) {
		this.enterpriseNo = enterpriseNo;
	}
	public String getEnterpriseName() {
		return enterpriseName;
	}
	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}

	


}
